const express = require('express')
const router = express.Router()
const ctrl1 = require('../controller/article.js')

// 监听客户端的get请求地址，显示文章添加页面
router.get('/article/add', ctrl1.articlePage)
    // 监听客户端发来的文章的请求
router.post('/article/add', ctrl1.addArticle)
    // 监听 客户端 查看文章详情的请求
router.get('/article/info/:id', ctrl1.infoPage)
router.get('/article/edit/:id', ctrl1.editPage)
router.post('/article/edit', ctrl1.editPage1)
module.exports = router